<template>
  <div class="volunteer-activities">
    <h2>我的活动</h2>
    <el-table :data="activities">
      <el-table-column prop="name" label="活动名称" />
      <el-table-column prop="date" label="活动日期" />
      <el-table-column prop="status" label="状态" />
      <el-table-column label="操作">
        <template #default="scope">
          <el-button type="primary" size="small" @click="viewDetails(scope.row)">
            查看详情
          </el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script setup>
import { ref } from 'vue'

const activities = ref([
  {
    id: 1,
    name: '海滩清理活动',
    date: '2024-04-01',
    status: '已报名'
  }
])

const viewDetails = (row) => {
  console.log('查看活动详情:', row)
}
</script> 